home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / RegWrite.au3 < prev    next >
Text File  |  2006-06-17  |  834b  |  19 lines

  1. ; Write a single REG_SZ value
  2. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "TestKey", "REG_SZ", "Hello this is a test")
  3.  
  4. ; Write the REG_MULTI_SZ value of "line1" and "line2"
  5. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "TestKey1", "REG_MULTI_SZ", "line1" & @LF & "line2")
  6.  
  7. ; Write the REG_MULTI_SZ value of "line1"
  8. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "TestKey2", "REG_MULTI_SZ", "line1")
  9.  
  10. ; always add and extra null string
  11. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "TestKey3", "REG_MULTI_SZ", "line1" & @LF & "line2" & @LF)
  12. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "TestKey4", "REG_MULTI_SZ", "line1" & @LF & @LF & "line2" & @LF)
  13.  
  14. ; empty REG_MULTI_SZ
  15. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "TestKey5", "REG_MULTI_SZ", "")
  16.  
  17. ; create just the key
  18. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test1")
  19.